<?php
/************************FoxPHP威客系统************************/
/*                                                            */
/*  FoxPHP.Com (C)2006-2016 FoxPHP Inc.                       */
/*  This is NOT a freeware, use is subject to license terms   */
/*  FoxPHP威客系统是商业软件,使用于商业用途请购买授权         */
/*  V3.0 2016.3                                               */
/*  foxphp@aliyun.com                                         */
/*  http://www.foxphp.com                                     */
/*                                                            */
/**************************************************************/


namespace City\Controller;
use Think\Controller;
class SetController extends Controller {
	
	public function indexAction(){
		
		$catid=intval($_POST['id']);
		if($catid==9999){
			session('CityId',$catid);
			session('City',null);
			$_GET['city']=null;
		}else{
			$cityarr=M('CategoryCity')->where(" catid=$catid ")->find();
			if(!empty($cityarr['catid'])){
				session('City',$cityarr);
				session('CityId',$cityarr['apiid']);
				$_GET['city']=$cityarr['catid'];
			}
		}
		$this->ajaxReturn(array('title'=>'设置成功','message'=>'设置成功!','status'=>'ok','refresh'=>true),$_POST['datatype']);
	}

}

?>